package com.lzx.adx.report.enums;

public enum WphCovertXiaoMiEventTypeEnums {

    firstPurchase("APP_NEW_USER_PURCHASE","NEW_ORDER","24饿了吗注册24小时内首购，首笔订单","HjlixXokCphXtFjs")
    ;


    /**
     * wphCode
     */
    private String wphCode;

    /**
     * 广点通code
     */
    private String code;

    /**
     * 秘钥
     */
    private String key;

    private String msg;


    public String getWphCode() {
        return wphCode;
    }

    public void setWphCode(String wphCode) {
        this.wphCode = wphCode;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public String getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }


    public String getKey() {
        return key;
    }

    /**
     * 根据饿了么code ,找到广点通code
     * @param elmCode
     * @return
     */
    public static WphCovertXiaoMiEventTypeEnums getXiaomiCode(String wphCode){
        for (WphCovertXiaoMiEventTypeEnums value : WphCovertXiaoMiEventTypeEnums.values()) {
            if(value.getWphCode().equals(wphCode)){
                return value;
            }
        }
        return  null;
    }


    WphCovertXiaoMiEventTypeEnums(String code, String wphCode, String msg, String key) {
        this.wphCode = wphCode;
        this.code = code;
        this.msg = msg;
        this.key=key;
    }
}
